# Sample Makefile for a anjuta plugin.

include $(top_srcdir)/Makefile.decl
SUBDIRS = unit_test

js_support_plugin_gladedir = $(anjuta_glade_dir)
js_support_plugin_glade_DATA = anjuta-language-javascript.ui

js_support_plugin_uidir = $(anjuta_ui_dir)
js_support_plugin_ui_DATA = anjuta-language-javascript.xml

# Plugin Icon file
js_support_plugin_pixmapsdir = $(anjuta_image_dir)
js_support_plugin_pixmaps_DATA = js_support_plugin.png

# Plugin description file
plugin_in_files = js_support_plugin.plugin.in
%.plugin: %.plugin.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache

js_support_plugin_plugindir = $(anjuta_plugin_dir)
js_support_plugin_plugin_DATA = $(plugin_in_files:.plugin.in=.plugin)

# NOTE :
# The naming convention is very intentional
# We are forced to use the prefix 'lib' by automake and libtool
#    There is probably a way to avoid it but it is not worth to effort
#    to find out.
# The 'anjuta_' prfix is a safety measure to avoid conflicts where the
#    plugin 'libpython.so' needs to link with the real 'libpython.so'

# Include paths
AM_CPPFLAGS = \
	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
	-DANJUTA_DATA_DIR=\"$(anjuta_data_dir)\" \
	-DANJUTA_PLUGIN_DIR=\"$(anjuta_plugin_dir)\" \
	-DANJUTA_IMAGE_DIR=\"$(anjuta_image_dir)\" \
	-DANJUTA_GLADE_DIR=\"$(anjuta_glade_dir)\" \
	-DANJUTA_UI_DIR=\"$(anjuta_ui_dir)\" \
	-DPACKAGE_DATA_DIR=\"$(datadir)\" \
	-DPACKAGE_SRC_DIR=\"$(srcdir)\" \
	-DGIR_PATH=\"$(girdir)\" \
	-DGJS_PATH=\"$(gjsdir)\" \
	$(LIBANJUTA_CFLAGS)

# Where to install the plugin
plugindir = $(anjuta_plugin_dir)

# The plugin
plugin_LTLIBRARIES = libjs_support_plugin.la

# Plugin sources
libjs_support_plugin_la_SOURCES = plugin.c plugin.h code-completion.c code-completion.h util.c util.h \
y.tab.c y.tab.h lex.yy.c lex.yy.h jsparse.c jsparse.h ijs-symbol.h ijs-symbol.c gir-symbol.c gir-symbol.h gi-symbol.c gi-symbol.h simple-symbol.c simple-symbol.h local-symbol.c local-symbol.h  node-symbol.c node-symbol.h import-symbol.c import-symbol.h dir-symbol.c dir-symbol.h std-symbol.c std-symbol.h database-symbol.c database-symbol.h db-anjuta-symbol.c db-anjuta-symbol.h

# Plugin dependencies
libjs_support_plugin_la_LIBADD = \
	$(LIBANJUTA_LIBS) 

EXTRA_DIST += \
	$(plugin_in_files)\
	$(js_support_plugin_plugin_DATA)\
	$(js_support_plugin_glade_DATA)\
	$(js_support_plugin_ui_DATA)\
	$(js_support_plugin_pixmaps_DATA)
